import React from "react";
import { storiesOf } from "@storybook/react-native";
import { Button } from "./Button";
import { ToggleButton } from "./ToggleButton";
import { Text, View } from "react-native";

export const ButtonDemo = () => {


  const [state, setCheckbox] = React.useState([]);

  const [isSelected, setSelected] = React.useState(false);

  const [isIndeterminate, setIsIndeterminate] = React.useState(true);

  const [isChecked, setIsChecked] = React.useState(false);
  function handleToggle(isSelected: boolean) {
    setSelected(isSelected);
  }
  return (
    <View>
      <Button isDisabled={true}> Button</Button>
      <Button > Button</Button>
      <ToggleButton isDisabled={true}>Toggle button</ToggleButton>
      <ToggleButton >Toggle button</ToggleButton>
      <ToggleButton onChange={handleToggle} >Toggle button</ToggleButton>
      <Text>onChange {isSelected ? "Selected" : "Not Selected"}</Text>
      <ToggleButton isSelected={true} >Toggle button</ToggleButton>
      <Text>isSelected true</Text>
      <ToggleButton defaultSelected={true} >Toggle button</ToggleButton>
      <Text>defaultSelected true</Text>
    </View>
  );
};

